-
Notifications
You must be signed in to change notification settings - Fork 132
#59 - Consider custom conversion in MappingR2dbcConverter #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just two minor comments.
|
||
public OutboundRow convert(Person source) { | ||
OutboundRow row = new OutboundRow(); | ||
document.put("_d", source.getId()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should be row.put ...
* @param value must not be {@literal null}. | ||
* @return the {@link SettableValue} value for {@code value}. | ||
*/ | ||
public static SettableValue from(Object value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This creates an asymmetry I don't like too much. With one argument you have a factory method, with two args you have to use the constructor.
I'd vote for either only factory methods or constructors but not mixing them in the public API.
MappingR2dbcConverter now considers custom conversions for inbound and outbound conversion of top-level types (Row to Entity, Entity to OutboundRow) and on property level (e.g. convert an object to String and vice versa).
d2e7333
to
b68db1b
Compare
MappingR2dbcConverter now considers custom conversions for inbound and outbound conversion of top-level types (Row to Entity, Entity to OutboundRow) and on property level (e.g. convert an object to String and vice versa). Original pull request: #70.
That's merged via 6654db3. |
MappingR2dbcConverter
now considers custom conversions for inbound and outbound conversion of top-level types (Row
to Entity, Entity toOutboundRow
) and on property level (e.g. convert an object toString
and vice versa).Related ticket: #59.